package test.course {
	import flash.display.Sprite;
	
	import org.kisekiproject.course.Course;
	
	import test.course.pages.HeaderAndBody;

	public class CourseWithVariablesTest extends Sprite {

		// Ensure classes are linked.
		private var classes:Array=[
			HeaderAndBody,
		];

		/**
		 * 
		 */
		public function CourseWithVariablesTest() {
			var source:XML=
				<course>
					<test.course.pages.HeaderAndBody>
						<body><![CDATA[{testvar}]]></body>
					</test.course.pages.HeaderAndBody>

					<variable id="testvar"><![CDATA[{x+5}]]></variable>
					<variable id="x"><![CDATA[{3+5}]]></variable>
				</course>;

			var course:Course=new Course();
			addChild(course);
			course.run(source);
		}
	}
}